Robot coordination in a shared workspace

ABSTRACT

Methods, systems, and computer programs stored on computer storage devices, for coordinating movements of robots are disclosed. One of the methods includes, for each robot in a group of robots, identifying a set of tasks assigned to the robot and generating a plurality of candidate motion plans. The method further includes, for each candidate motion plan: (i) generating a 3D model that represents a volume of space through which the robot would move in executing the sequence of motions represented by the candidate motion plan, and (ii) determining a score for the candidate motion plan. The method further includes determining conflicts between candidate motion plans of different robots, selecting a motion plan from the candidate motion plans based on the score for the selected motion plan and the conflicts, and providing the selected motion plans for execution by the group of robots.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to U.S. Provisional Application No.62/689,351, filed on Jun. 25, 2018. The disclosure of the priorapplication is considered part of and is incorporated by reference inthe disclosure of this application.

BACKGROUND

This specification generally describes techniques for planning themovements of robots in a shared workspace and, more specifically,improving motion planning for robots during concurrent task execution.

Robots have facilitated automation of tasks across a range of industriesand settings. Some systems have been developed that allow multiple,individually functioning robots to operate concurrently in a sharedworkspace. The set of robots that share a workspace are said to be partof a common “cell” or “workcell” of robots. A cell in a robotic systemcan be programmed to execute tasks to achieve a goal, such as theproduction of an item of manufacture, the assembly of a device, thefabrication of a component, or the inspection of an object. For example,in an automotive assembly line, a cell of robots with articulating armsmay surround a chassis of a vehicle and operate in the workspaceoccupied by the chassis to attach components, apply machining operations(e.g., drilling, spot welding, milling, or grinding one or more portionsof the chassis), perform measurements and inspections, or perform acombination of these and other operations. Each robot, for example, maypivot about a base, and may extend from the base with one, two, three,or more articulating segments, thereby allowing it to move and reach aportion or entirety of the shared workspace. The base itself may befixed, or may move in one or more dimensions, as well. To complete aproduction goal, robots in the cell may perform individual tasksserially and/or concurrently with other robots. Coordination of themovements and task execution by a cell of robots can be a complex,tedious process.

SUMMARY

In general, this specification discloses systems, methods, devices, andother techniques for improving the operation of robots in a sharedworkspace. A cell of robots can be programmed to execute tasks relatedto a common goal, such as completion of a product assembly orfabrication of one or more components. To improve efficiency of thecell's operations, the techniques disclosed herein may be applied toschedule the robots in the cell to perform particular tasks at specifictimes in a way that enhances one or more characteristics of the cell'soperations. Moreover, each robot may be provided with a motion plan thatfacilitates execution of the robot's tasks, while also allowing therobot to move about the shared workspace and avoid collisions or otherinterference with other robots in the cell. The system may createvirtual models (e.g., three-dimensional models) of the space swept by arobot during or between task executions, and may identify possibleinterference among the robots by identifying intersections or overlap ofthe virtual models indicating that two or more robots may attempt tooccupy the same space at or around the same time as each other. Thesystem can then adapt the motion plans, or select different motionplans, to avoid interference among the robots.

In further detail, a scheduling system can receive a set of tasks thatare to be performed by multiple robots. The scheduling system can assigneach individual robot a subset of the tasks that the robot can perform.In some implementations, the scheduling system groups each task in theset of tasks into clusters, such that each task is assigned to exactlyone cluster of tasks. The scheduling system then assigns each individualrobot one or more of the clusters. The scheduling system can thengenerate a set of candidate motion plans for each robot, each candidatemotion plan representing a different sequence of motions that can beperformed by the robot to complete the subset of tasks assigned to therobot. For each candidate motion plan, the scheduling system cangenerate a 3D model representing the volume of space that a robot wouldoccupy during the execution of the subset of tasks assigned to the robotaccording to the candidate motion plan. The scheduling system can thendetermine, for each candidate motion plan, a score that indicate anestimated efficiency of the candidate motion plan. The scheduling systemcan use the 3D model of each of the candidate motion plans to determineif the robots risk colliding as a result of executing the set ofcandidate motion plans. After scoring and determining conflicts betweencandidate motion plans, the scheduling system can select, for each ofthe multiple robots, a motion plan, chosen from the set of candidatemotion plans. The scheduling system selects the motion plans based onthe conflicts determined between motion plans and the score determinedfor each motion plan. The scheduling system can then provide the motionplans to the multiple robots for execution.

In general, a first aspect includes a method for coordinating movementsof a workcell of robots configured to operate in a shared workspace, themethod comprising: for each robot in the workcell of robots, identifyinga set of tasks assigned to the robot; generating multiple candidatemotion plans, each candidate motion plan representing a differentsequence of motions for the robot to execute in performing the set oftasks; for each candidate motion plan: (i) generating a 3D model thatrepresents a volume of space through which the robot would move inexecuting the sequence of motions represented by the candidate motionplan, and (ii) determining a score for the candidate motion plan, thescore based at least on a characteristic of the sequence of motionsrepresented by the candidate motion plan or a characteristic of thevolume of space represented by the 3D model for the motion plan;determining, using the 3D models corresponding to the candidate motionsplans of the workcell of robots, conflicts between candidate motionplans of different robots in the workcell of robots; for each robot inthe workcell of robots, selecting a motion plan from the multiplecandidate motion plans for the robot based on the score for the selectedmotion plan and determined conflicts between candidate motion plans forthe robot and candidate motion plans of other robots; and providing theselected motion plans for execution by the workcell of robots.

In general, in a first aspect, a method for coordinating the movementsof a group of robots configured to operate in a shared workspaceincludes, for each robot in the group of robots, identifying a set oftasks assigned to the robot and generating a group of candidate motionplans, each candidate motion plan representing a different sequence ofmotions for the robot to execute in performing the set of tasks. Foreach candidate motion plan, the method further includes (i) generating a3D model that represents a volume of space through which the robot wouldmove in executing the sequence of motions represented by the candidatemotion plan, and (ii) determining a score for the candidate motion plan,the score based at least on a characteristic of the sequence of motionsrepresented by the candidate motion plan or a characteristic of thevolume of space represented by the 3D model for the motion plan. Themethod further includes determining, using the 3D models correspondingto the candidate motions plans of the group of robots, conflicts betweencandidate motion plans of different robots in the group of robots. Themethod further includes selecting, for each robot in the group ofrobots, a motion plan from the group of candidate motion plans for therobot based on the score for the selected motion plan and determinedconflicts between candidate motion plans for the robot and candidatemotion plans of other robots. The method further includes providing theselected motion plans for execution by the group of robots.

Implementations of the method can include one or more of the followingfeatures. For example, the method can further include, for each robot inthe group of robots, identifying a group of sets of tasks assigned tothe robot, generating a group of candidate motion plans for each set oftasks in the group of sets of tasks, and selecting, for each robot inthe group of robots, a motion plan from the group of candidate motionplans for each set of the group of sets of tasks.

Identifying a set of tasks assigned to the robot may include generatinga group of clusters of tasks by assigning each task in the set of tasksto one of the multiple clusters, and for each cluster of the multipleclusters, identifying one or more candidate robots from the group ofrobots to perform the tasks in the cluster.

Generating a group of clusters of tasks by assigning each task in theset of tasks to one of the multiple clusters may include determining anapproximate solution to the traveling salesman problem.

In some implementations, a characteristic of the sequence of motionsrepresented by the candidate motion plan includes an estimated durationof time to execute the candidate motion plan. In other implementations,a characteristic of the sequence of motions represented by the candidatemotion plan includes an estimated complexity of a path traced by therobot during execution of the motion plan.

A characteristic of the volume of space represented by the 3D model forthe motion plan may include the amount of space encompassed by the 3Dmodel.

The method may further include obtaining a workcell volume cost map, theworkcell volume cost map describing costs associated with a robotoccupying different portions of space in the shared workspace. For eachrobot in at least a subset of the group of robots and for each candidatemotion plan in at least a subset of the group of candidate motion plansfor the robot, determining the score for the candidate motion plan mayinclude determining various portions of space that the robot would movethrough in executing the sequence of motions represented by thecandidate motion plan, determining, using the workcell volume cost map,costs associated with the robot moving through the various portions ofspace, and determining the score for the candidate motion plan based onthe costs associated with the robot moving through the various portionsof space.

In some implementations, the group of candidate motion plans meet aminimum diversity requirement between a particular motion plan in thegroup of candidate motion plans and an alternative motion plan not inthe group of candidate motion plans.

In some implementations, the minimum diversity requirement measures adifference between an amount of space represented by a 3D model for theparticular motion plan and an amount of space represented by a 3D modelfor the alternative motion plan. The minimum diversity requirementmeasures a difference between an estimated duration of time to completethe particular motion plan and an estimated duration of time to completethe alternative motion plan. Generating a group of candidate motionplans may include generating a first group of motion plans and samplingmotion plans from the first group of motion plans for inclusion in thegroup of candidate motion plans based on the minimum diversityrequirements.

Other implementations of this and other aspects include correspondingsystems, apparatus, and computer programs, configured to perform theactions of the methods, encoded on computer storage devices. A system ofone or more computers can be so configured by virtue of software,firmware, hardware, or a combination of them installed on the systemthat in operation cause the system to perform the actions. One or morecomputer programs can be so configured by virtue of having instructionsthat, when executed by data processing apparatus, cause the apparatus toperform the actions.

Some implementations of the subject matter disclosed herein can, incertain instances, achieve one or more of the following advantages. Thescheduling system described herein can be used to coordinate themovement of multiple robots executing tasks in a common workspace so asto avoid collisions between the multiple robots. The scheduling systemmay allow robots to occupy a smaller workspace without the need toposition the robots far enough apart that they do not risk collisionswith neighboring robots. The scheduling system can also determine a costassociated with the robot occupying various portions of the commonworkspace, and generate a motion plan that restricts a robot fromoccupying areas that may cause scheduling conflicts with another robot.By generating motion plans according to the techniques described herein,the scheduling system can also allow the robots to conserve energy anddecrease the overall time the robots spend executing tasks. Moreover,possible interferences (e.g., collisions) among two or more robots canbe detected during the planning stage in a computationally efficientmanner by identifying intersections among 3D models representing theregions of space swept by the robots during their respective motions.

In addition, the scheduling system can reduce the amount of timerequired to schedule the movement of multiple robots, compared to thescheduling time required by a conventional, human-programmed approach.For example, while a human-programmed approach can require weeks togenerate a motion plan, the time required for the scheduling system togenerate the same motion plan can be on the order of hours. Therefore,the scheduling system allows for greater flexibility with regard to thenumber and type of robots in a workcell because robots can be added orremoved from the workcell without requiring a substantial amount of timeto reschedule the robots of the modified workcell.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a scheduling system for a robotic system.

FIG. 2A is a diagram of a set of tasks and a group of robots.

FIG. 2B is a diagram of the set of tasks of FIG. 2A, the robots of FIG.2A, and multiple sets of tasks assigned to the robots.

FIG. 2C is a diagram of the set of tasks, the robots of FIGS. 2A-2B,multiple sets of tasks assigned to the robots, multiple transitions foreach robot, and multiple representations of 3D models.

FIG. 2D is a diagram of the robots of FIGS. 2A-2C, the multiplerepresentations of 3D models of FIG. 2C, and an identification ofconflicts between the multiple representations of 3D models.

FIG. 3A is a block diagram of the representations of 3D models as shownin FIGS. 2C and 2D and candidate motion plans for the robots of FIGS.2A-2D.

FIG. 3B is a block diagram of representations of 3D models, transitions,and conflicts for the 3D models.

FIG. 4 is a flow diagram for an example process of determining a set ofmotion plans for a group of robots to execute.

DETAILED DESCRIPTION

FIG. 1 shows a block diagram of a scheduling system 100. The schedulingsystem 100 includes a clustering engine 102, a motion planning engine104 that includes a transition planning engine 106, a motion sweptvolume engine 108, a collision detection engine 110, a scoring engine112, and a scheduling engine 114. Arrows connecting components of thescheduling system 100 indicate a communicative coupling between thecomponents.

The clustering engine 102 is configured to receive a set of tasks thatcan be performed by a group of robots and group the tasks into clusters.Each task can be assigned to exactly one cluster. Following thegeneration of the clusters, the clustering engine 102 can label eachcluster as feasible by a given robot. In other words, for each robot andcluster pair, the clustering system 102 can determine whether the robotcan perform the tasks of the cluster. If the robot is not able toperform at least one task of a cluster, e.g., if the robot does notpossess the hardware or software required to complete the task, then theclustering engine 102 can reject the robot and cluster pair as beinginfeasible.

As an example, a set of tasks can include riveting components of a carat various locations, where each task represents a riveting operation ata distinct location on the chassis of the car. The clustering engine 102can receive the set of tasks and group all the riveting operations onthe driver's side of the car into a first cluster and all the rivetingoperations on the passenger's side into a second cluster. The schedulingsystem 100 can then determine that a robot positioned on the driver'sside can perform the riveting operations of the first cluster, but notthe second cluster, and that a different robot positioned on thepassenger's side can perform the riveting operations of the secondcluster, but not the first cluster.

The clustering engine 102 can determine the clusters in a number ofways. As in the above example, the clustering engine 102 can group thetasks into clusters according to their proximity to one another, withtasks that are close to one another being grouped into the same cluster.

As another example, the clustering engine 102 can cluster tasksaccording to a sequence in which the tasks must be completed. A taskprecedence constraint is said to exist if a first task must be completedbefore a second task. The clustering engine 102 can group the first taskinto a first cluster and the second task into a second cluster andcommunicate a task precedence constraint that requires the first task beperformed before the second task.

As another example, the clustering engine can cluster tasks according tothe actions that the tasks require a robot to perform. If a first set oftasks requires the robot to drill a component while and a second set oftasks requires the robot to weld two components together, the clusteringengine 102 can determine that the two sets of tasks require differenttools. In response, the clustering engine 102 can recognize that thefirst and second sets of tasks require different tools and therefore,cannot be placed in the same cluster.

In some implementations, the clustering engine 102 determines theclusters by finding an approximate solution to the traveling salesmanproblem. In some implementations, the scheduling system 100 does notinclude the clustering engine 102.

The motion planning engine 104 generates candidate motion plans. Amotion plan represents a sequence of motions for a robot to execute toperform a set of tasks assigned to the robot. A motion plan can includemotions for one or more transitions between clusters of tasks executedby a robot, one or more transitions between tasks of a single cluster, atransition between a starting position of the robot and a cluster oftasks, a transition between a cluster of tasks and an ending position ofthe robot, or a combination of these. For example, a motion plan can bedefined as a path that sequentially connects the following positions ortasks: a starting position of a robot, an initial task in a firstcluster of tasks assigned to the robot, a final task in a second clusterof tasks assigned to the robot, and finally, an ending position of therobot.

In some implementations, the motion planning engine 104 receives one ormore clusters of tasks feasible by a robot and generates one or morecandidate motion plans for the robot. The motion planning engine 104 cangenerate the candidate motion plans in a number of ways. Like theclustering engine 102, the motion planning engine 104 can determine asequence in which the tasks must be completed and generate a motion planwith respect to the sequence. As another example, the motion planningengine 104 can determine whether a robot is capable of performing thetasks of a particular motion plan.

In other implementations, the motion planning engine 104 receives one ormore clusters generated by the clustering engine 102 and generatesmultiple motion plans based on multiple ways at least one task of theone or more clusters can be performed. For example, a task could bewelding a vertical portion of a vehicle. One way of executing thewelding task is starting at the top of the vertical portion and weldingdownwards, while another way of executing the welding task is startingat the bottom of the vertical portion and welding upwards. The motionplanning engine 104 can generate both a downward welding motion plan aswell as an upward welding motion plan.

The motion planning engine 104 includes the transition planning engine106, which is configured to generate transitions. As an example of atransition, prior to performing a task, a robot transitions from a firstposition (e.g., a home or default position) to a second position inwhich the robot can perform the task. As an additional example, atransition can represent a path from a last task of a first cluster to afirst task of a second cluster. The transition planning engine 106 canreceive, from the motion planning engine 104, multiple clusters of tasksand an accompanying sequence of movements that a robot can perform toexecute the tasks in the cluster. Using the clusters of tasks and thesequences of movements, the transition planning engine 106 can generatetransitions between tasks.

The motion swept volume engine 108 is configured to generate a 3D modelthat represents the volume of space through which the robot would movein executing the sequence of motions represented by a candidate motionplan. The motion swept volume engine can receive motion plans from themotion planning engine 104 and generate a 3D model corresponding to themotion plans and transitions.

For example, the motion swept volume engine 108 can generate the 3Dmodels can be generated using a generator object, e.g., a triangle mesh,that is moved along a 3D path incrementally. At each increment, thegenerator is transformed to the location specified by the path. Themotion swept volume engine 108 can add triangles to connect the previousinstance of the generator to the current instance on the path. Themotion swept volume engine 108 can use a culling algorithm to removeconnecting triangles that would end up inside the resulting sweptvolume. Using the culling algorithm can reduce the memory used by themotion swept volume engine 108 and accelerate the generation of the 3Dmodels.

Each 3D model can be generated on a common virtual coordinate systemthat allows the motion swept volume engine 108 to localize each 3D modelin relation to other 3D models. The motion swept volume engine 108 candetermine intersections between 3D models as they are added to thecommon virtual coordinate system.

In some implementations, the motion swept volume engine 108 can controlthe resolution of the 3D model by adjusting the resolution of thegenerator object, controlling the time the generator object spends ateach increment, or both.

In some implementations, a motion swept volume engine of the schedulingsystem can receive information related to the size of a robot and allits movable components. From this information, the motion swept volumeengine can generate a 3D model that simulates the movement of the robotas it moves through the workspace and executes tasks assigned to it.

In other implementations, the scheduling system can generate the 3Dmodel based on actual movements of the robot. For example, the robot canexecute a motion plan to determine a corresponding volume of space forthese movements. While executing the movements, the motion swept volumeengine can trace the motion of a set of points on the surface of therobot. The motion swept volume engine can then use the paths formed in3D space by the motion of the set of points to generate a 3D model.

The collision detection engine 110 is configured to detect collisionsbetween robots. The collision detection engine 110 can receive 3D modelscorresponding to motion plans associated with multiple robots from themotion swept volume engine 108. The collision detection engine 110 cananalyze the 3D models of the motion plans to determine whether thevolumes of space the models represent intersect with one another. Anintersection between 3D models indicates that the robots executing themotion plans corresponding to the 3D models risk colliding with oneanother.

The scoring engine 112 is configured to score a 3D model correspondingto a motion plan. The scoring engine can receive a 3D model from the 3Dmodel engine and data related to collisions from the collision detectionengine 110 and generate a score for the 3D model. The score canindicate, for example, an estimated efficiency associated with a robotthat performs the motion plan that corresponds to the 3D model, withhigher scores representing more efficient motion plans. In someimplementations, a first motion plan associated with a set of tasks canbe deemed more efficient than a second motion plan associated with thesame set of tasks if a robot executing the first motion plan is able toexecute the set of tasks more quickly than the same robot executing thesecond motion plan. In some implementations, the first motion plan canbe deemed more efficient than the second motion plan if the robot isable to execute the first motion plan using less energy than it wouldexpend executing the second motion plan. In addition, the first motionplan can be more efficient than the second motion plan if the robot isable to execute the first motion plan using less time and/or volume thanit would use when executing the second motion plan. Criteria on whichthe scoring engine 112 can determine the scores are discussed below withregard to FIG. 4.

The scheduling engine 114 is configured to schedule a set of tasks for agroup of robots in a way that avoids collisions among the robots. Thescheduling engine 114 schedules the set of tasks by assigning one ormore motion plans to a robot.

FIGS. 2A through 2D are diagrams that illustrate stages of an exampleprocess of scheduling a set of tasks to be performed by a group ofrobots. FIGS. 2A through 2D include a robot 202, 204, and 206.

FIG. 2A is a diagram 200A of the set of tasks and the robots 202-206. Inthis stage, each of the robots 202-206 are in a unique startingposition. The robots 202-206 may each have a base that is fixed inposition, and one or more segments extending from the base that canpivot and articulate to reach areas of the shared workspace of therobots. Each robot may use one or more tools held at the distal end ofthe robot to perform tasks such as drilling, welding, heating, milling,riveting, or other specified tasks.

FIG. 2B is a diagram 200B of the set of tasks, the robots 202-206, andmultiple sets of tasks assigned to the robots 202-206. In this stage,the clustering engine 102 has generated a set of clusters of tasks,including clusters 210, 212, 214, 216, and 218. The clusters arerepresented by an arbitrary shape that illustrates which tasks areassigned to which cluster. Each of the tasks is assigned to exactly onecluster and the tasks that make up each cluster are assigned to exactlyone robot. In the example of FIG. 2B, the motion planning engine 104assigns the tasks of clusters 210, 212, and 214 to the robot 202. Alsoin this example, the motion planning engine assigns the tasks of cluster216, 218, and 220 to the robot 206, and the tasks of the cluster 222 tothe robot 204.

Also in this stage, the motion planning engine 104 generates, for eachof the clusters, a sequence of motions that the robots 202-206 canexecute. The sequence of motions are represented by lines that connecttwo tasks. Diagram 200B shows motions 212 a through 212 c that connecttasks of the cluster 212.

FIG. 2C is a diagram 200C of the set of tasks, the robots 202-206,multiple sets of tasks assigned to the robots 202-206, multipletransitions for each robot, and multiple representations of 3D models.In this stage, the transition planning engine 106 can generate atransition between the starting position of each robot and a clusterassigned to the robot. For example, the transition planning engine 106can generate a transition 230 that connects a starting position of therobot 202 to a task in the cluster 210. The transition planning engine106 can also generate a transition between each cluster assigned to aparticular robot; for example, transition 232 that connects the task inthe cluster 210 with a task in the cluster 212 and transition 234 thatconnects two tasks in the clusters 212 and 214. The transition planningengine 106 can also generate a transition 236 from a task in the cluster214 to an ending position of the robot 202. In the example of FIG. 2C,the ending position of the robot 202 coincides with the startingposition of the robot, although the starting and ending positions of arobot can be two different locations.

The diagram 200C also shows multiple representations of 3D models. Each3D model generally represents a cumulative region of space that a robotoccupies at any point in time during its execution of one or more tasksof a motion plan. Referring to the example of FIG. 2B, the motion sweptvolume engine 108 can receive the motions 212 a through 212 c andgenerate a 3D model 242. Techniques for generating a 3D model from amotion plan are discussed further with regard to FIG. 4.

FIG. 2D is a diagram 200D of the robots 202-206, multiplerepresentations of 3D models, and an identification of conflicts betweenthe multiple representations of 3D models. The collision detectionengine 110 can receive the 3D models from the motion swept volume engine108 and determine which 3D models, if any, intersect. For example, thecollision detection engine 110 can identify a conflict 250, whichresults from the intersection of the 3D models 240 and 244. In additionto the conflict 250, the diagram 200D also includes the conflicts 252,and 254, which result from the intersection of the 3D models 244 and 246and 3D models 242 and 246, respectively.

The 3D model 242 not only intersects with the 3D model 246, but alsowith the 3D model 240. While the collision detection engine 110identifies the intersection between the 3D models 242 and 246 as theconflict 254, the engine does not identify the intersection between 3Dmodels 240 and 242 as a conflict because the tasks associated with the3D models 240 and 242 are all assigned to the same robot, robot 202.Because the tasks are assigned to the robot 202, the robot must completethe tasks associated with one of the 3D models 240 and 242 beforeproceeding to complete the tasks associated with the other 3D model.That is, the robot 202 does not risk collisions when performing themotion plan associated with 3D models 240 and 242, because the robotwill not be working on the tasks associated with the 3D models 240 and242 at the same time.

FIG. 3A is a block diagram 300A of the representations of 3D models asshown in diagrams 200C and 200D and candidate motion plans for therobots 202-206. The 3D models shown in diagram 300A are labeled Athrough G. As previously mentioned, the tasks associated with the 3Dmodels A, B, and C are assigned to the robot 202, while the tasksassociated with the 3D models D, E, and F are assigned to robot 206, andfinally, the tasks associated with the 3D model G is assigned to robot204. The diagram 300A also shows transitions 302 a, 304 a, 306 a, and308 a, as well as the conflicts 250, 252, and 254. Although not labeledthe diagram 300A also shows transitions between starting positions ofthe robots and the 3D models and transitions between ending positions ofthe robots and the 3D models.

FIG. 3B is a block diagram 300B of representations of 3D models Athrough G, transitions, and conflicts for the 3D models A through G.Each of the 3D models A through G of the diagram 300A are represented bycorresponding blocks A through G in the diagram 300B. The order of theblocks show the temporal order, in relation to a timeline 310, in whicha robot executes the tasks associated with the blocks. For example,robot 202 first executes the tasks associated with block A, then blockB, and finally, block C. The width of the blocks A through G indicate anestimated amount of time it would take one of the robots 202, 204, or206 to execute the tasks associated with each block.

The diagram 300B also includes transitions 302 b, 304 b, 306 b, and 308b that correspond to the transitions 302 a, 304 a, 306 a, and 308 ashown in the diagram 300A. The diagram 300B also includes the conflicts350, 352, and 354, which correspond to the conflicts 250, 252, and 254.

The diagram 300B can be used to visualize the conflicts that ariseduring execution of the motion plans assigned to each robot. The diagram300B illustrates that a conflict, such as the conflict 350, will notcause a collision unless the task associated with block A is executed bythe robot 202 at the same time as the tasks associated with block E areexecuted by robot 206. As shown in the diagram 300B, the task associatedwith block A is executed before those associated with block E, resultingin no collision between the robots 202 and 206.

The diagram 300B shows conflict 354, which indicates that the tasksassociated with block B conflict with those of the block G. The robots202 and 204 are likely to collide, because the tasks associated with theblock B are executed by the robot 202 at the same time that the robot204 is executing the tasks associated with the block G. Similarly, thecollision detection engine 110 can predict that the robots 204 and 206will also collide because the tasks associated with the block G and thetasks associated with block E are executed are executed at the sametime.

FIG. 4 is a flow diagram for an example process of determining a set ofmotion plans for a group of robots to execute. The example process canbe performed by the scheduling system 100 of FIG. 1.

The scheduling system identifies, for each robot in a workcell ofrobots, a set of tasks assigned to the robot (405). In someimplementations, the scheduling system assigns the set of tasks to therobot. The scheduling system can assign a task to a robot based on anumber of considerations. For example, the scheduling system can assigna task to a robot based on the proximity of the robot to the task. Asanother example, if the robot is the only robot in the workcell ofrobots that has the appropriate mechanical capabilities to complete thetask, then the scheduling system can identify the robot as beinguniquely capable of executing the task, and therefore, assign the taskto the robot.

In some implementations, the scheduling system generates multipleclusters of tasks by assigning each task in the set of tasks to one ofthe multiple clusters. Afterwards, the scheduling system can identify,for each cluster of the multiple clusters, one or more candidate robotsfrom the workcell of robots to perform the tasks in the cluster. Thatis, a clustering engine of the scheduling system can place each taskinto exactly one cluster, and assign each cluster to exactly one robot.

The scheduling system generates, for each robot in the workcell ofrobots, a multiple candidate motion plans, each candidate motion planrepresenting a different sequence of motions for the robot to execute inperforming the set of tasks (410). The scheduling system generates themultiple candidate motion plans for each particular robot withoutconsidering any additional robots other than the particular robot.

In some implementations, the scheduling system can generate a graphwhere the set of vertices of the graph are the plurality of tasks, andthe set of edges of the graph are movement paths that the robot can makefrom one task to another. Using this graph, the scheduling system cangenerate the multiple candidate motion plans using any free motiongenerator, e.g., a rapidly-exploring random tree (RRT) planner or aprobabilistic roadmap (PRM) planner.

The scheduling system generates, for each robot in the workcell ofrobots and for each candidate motion plan, a 3D model that represents avolume of space through which the robot would move in executing thesequence of motions represented by the candidate motion plan (415).

In some implementations, the scheduling system can generate a workcellvolume cost map that can describe a cost associated with a robot movingthrough the environment of the workcell of robots. For example, a regionof space can have a high cost associated with it if the region of spaceis within a threshold distance to the starting or ending positions of arobot. As another example, a region of space can have a high cost if itis one in which the candidate motion plans of multiple robots passthrough during execution of one or more tasks.

As an example, the scheduling system can generate a workcell volume costmap by performing the following actions. The scheduling system canpartition the environment of the workcell of robots into voxels of apredetermined size. The scheduling system can then use the 3D modelgenerated for each candidate motion plan in stage 415 to determine acount for each voxel, where the count is a number of candidate motionplans that pass through the space defined by the voxel. For example, thescheduling system can maintain a data structure that records the countfor each voxel. The scheduling system can increment the count for avoxel each time a candidate motion plan passes through the voxel. Afterdetermining a count for each voxel, the scheduling system can generate aworkcell volume cost map in which portions of the environmentcorresponding to voxels having higher counts are assigned higher coststhan those of portions of the environment corresponding to voxels havinglower counts.

The scheduling system can determine the portion of space that the robotoccupies while executing a candidate motion plan. For example, thescheduling system can determine the portion of space using the 3D modelassociated with the candidate motion plan. Using the workcell volumecost map, the scheduling system can determine a cost associated with therobot moving through the environment of the workcell. For example, thescheduling system can determine an average cost associated with thevolume occupied by the 3D model. The scheduling system can thendetermine a score for the candidate motion plan using the costassociated with the robot moving through the environment of theworkcell.

The scheduling system determines, for each robot in the workcell ofrobots and for each candidate motion plan, a score for the candidatemotion plan, the score based at least on a characteristic of thesequence of motions represented by the candidate motion plan or acharacteristic of the volume of space represented by the 3D model forthe motion plan (420). The higher the score assigned to a candidatemotion plan, the more efficient the candidate motion plan is.

In some implementations, a characteristic of the sequence of motionsrepresented by the candidate motion plan can include an estimatedduration of time to complete the candidate motion plan. That is, thescheduling system can estimate the amount of time that a robot may taketo execute the candidate motion plan and assign a score based on thetime estimate. The scheduling system can then assign lower scores tocandidate motion plans that take longer to execute and higher scores tocandidate motion plans that take less time to execute.

In some implementations, a characteristic of the sequence of motionsrepresented by the candidate motion plan can include an estimated energyconsumption of a robot during execution of the motion plan. For example,the energy consumption of the robot during execution of the motion plancan be directly proportional to the amount of times that the candidatemotion plan requires the robot to change direction. Accordingly, ifexecuting a first candidate motion plan requires more energy consumptionthan executing a second candidate motion plan, the scheduling system canassign a lower score to the first candidate motion plan than to thesecond candidate motion plan.

In some implementations, a characteristic of the volume of spacerepresented by the 3D model for the motion plan can include the amountof space encompassed by the 3D model. That is, the scheduling system canestimate the volume of space that the candidate motion plan may occupy.The scheduling system can then assign lower scores to candidate motionplans that occupy less volume.

In some implementations, the scheduling system can determine the scorebased on the workcell volume cost map generated in stage 410. Thescheduling system can calculate, using the workcell volume cost map, acost associated with the candidate motion plan and determine a scorebased on the cost associated with the candidate motion plan. Thescheduling system can then assign lower scores to candidate motion plansthat have high costs.

The scheduling system can generate motion plans each having a uniquestarting or ending pose. A pose of a robot can include the orientationof the robot and the orientation of any tools of the robot. Thescheduling system can determine each possible pose that the robot canhave at a certain location. One or more constraints imposed on the robotdetermine whether a motion plan can include a certain pose. For example,a constraint on the available poses at a certain location can be basedon the free space within the vicinity of the robot at the location.

In some implementations, the scheduling system can require that themultiple candidate motion plans meet a minimum diversity requirementbetween a particular motion plan in the multiple candidate motion plansand an alternative motion plan not in the multiple candidate motionplans. For example, the candidate motion plans can include two motionplans that both execute a common task. Each candidate motion plan caninclude a unique set of poses, e.g., different starting poses, ordifferent ending poses. For the two motion plans to meet a minimumdiversity requirement, the two motion plans must be significantlydifferent, e.g., include poses that are significantly different. If thescheduling system determines that the two motion plans do not meet theminimum diversity requirement, then the system can select one to be acandidate motion plan and exclude the other motion plan from being acandidate motion plan.

In some implementations, the minimum diversity requirement specifies aminimum difference between an amount of space represented by one or more3D models for the particular motion plan and an amount of spacerepresented by one or more 3D models for the alternative motion plan.For example, a motion planning engine can generate an order in which arobot executes example tasks A, B, C and D. A first motion plan canrepresent a sequence of motions that cause the robot to execute tasks inthe order A, B, C, then D. A second motion plan can represent a sequenceof motions that cause the robot to execute tasks in the order A, C, B,then D. If the tasks B and C are located close to one another, then thescheduling system can determine that the volume of the one or more 3Dmodels for the first motion plan may not be significantly different fromthe volume of the one or more 3D models for the second motion plan.Because the volumes are not significantly different, the schedulingsystem can include one of either the first or the second motion plans inthe multiple candidate motion plans.

As another example, the motion planning engine can generate multiplemotion plans that cause a robot to execute example tasks A, B, and C. Afirst motion plan can represent a sequence of motions that causes therobot to execute tasks in the order A, B, then C, while a second motionplan can represent a sequence that causes the robot to execute the tasksin the order C, B, then A. The first motion plan may take the sameamount of time to execute as the second motion plan. Because of this,the scheduling system can determine that the two motion plans aresubstantially similar, and include one of either the first or the secondmotion plans in the multiple candidate motion plans.

The scheduling system determines, using the 3D models corresponding tothe candidate motions plans of the workcell of robots, conflicts betweencandidate motion plans of different robots in the workcell of robots(425). A collision detection engine of the scheduling system can receivea set of 3D models and determine whether any of the 3D models occupy thesame volume of space, representing a conflict.

The scheduling system selects, for each robot in the workcell of robots,a motion plan from the multiple candidate motion plans for the robotbased on the score for the selected motion plan and determined conflictsbetween candidate motion plans for the robot and candidate motion plansof other robots (430). For example, the scheduling system can identifyall candidate motion plans that have a conflict and determine whetherthe conflict would result in a collision. If the conflicting motion planwould result in a collision, e.g., if, when executing the conflictingmotion plan, two or more robots would collide, then the schedulingsystem can remove the conflicting motion plan from the set of candidatemotion plans. After removing conflicting motion plans that would resultin a collision, the scheduling system can then select, from theremaining candidate motion plans, a motion plan for each robot accordingto which motion plan for each robot has the highest score.

The scheduling system provides the selected motion plans for executionby the workcell of robots (435). The scheduling system can send therobots their respective selected motion plans. Each robot can thenexecute the set of tasks according to its receive motion plan.

Embodiments of the invention and all of the functional operationsdescribed in this specification may be implemented in digital electroniccircuitry, or in computer software, firmware, or hardware, including thestructures disclosed in this specification and their structuralequivalents, or in combinations of one or more of them. Embodiments ofthe invention may be implemented as one or more computer programproducts, i.e., one or more modules of computer program instructionsencoded on a computer-readable medium for execution by, or to controlthe operation of, data processing apparatus. The computer readablemedium may be a non-transitory computer readable storage medium, amachine-readable storage device, a machine-readable storage substrate, amemory device, a composition of matter affecting a machine-readablepropagated signal, or a combination of one or more of them. The term“data processing apparatus” encompasses all apparatus, devices, andmachines for processing data, including by way of example a programmableprocessor, a computer, or multiple processors or computers. Theapparatus may include, in addition to hardware, code that creates anexecution environment for the computer program in question, e.g., codethat constitutes processor firmware, a protocol stack, a databasemanagement system, an operating system, or a combination of one or moreof them. A propagated signal is an artificially generated signal, e.g.,a machine-generated electrical, optical, or electromagnetic signal thatis generated to encode information for transmission to suitable receiverapparatus.

An “engine” as used herein refers to a data processing apparatus (e.g.,one or more computers, one or more processors) configured to performoperations. The data processing apparatus can be provided in one or morelocations, and can assume a centralized or distributed architecture.

A computer program (also known as a program, software, softwareapplication, script, or code) may be written in any form of programminglanguage, including compiled or interpreted languages, and it may bedeployed in any form, including as a stand-alone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program may be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programmay be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this specification may beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows may also be performedby, and apparatus may also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Moreover, a computer may be embedded inanother device, e.g., a tablet computer, a mobile telephone, a personaldigital assistant (PDA), a mobile audio player, a Global PositioningSystem (GPS) receiver, to name just a few. Computer readable mediasuitable for storing computer program instructions and data include allforms of non-volatile memory, media, and memory devices, including byway of example semiconductor memory devices, e.g., EPROM, EEPROM, andflash memory devices; magnetic disks, e.g., internal hard disks orremovable disks; magneto optical disks; and CD ROM and DVD-ROM disks.The processor and the memory may be supplemented by, or incorporated in,special purpose logic circuitry.

To provide for interaction with a user, embodiments of the invention maybe implemented on a computer having a display device, e.g., a CRT(cathode ray tube) or LCD (liquid crystal display) monitor, fordisplaying information to the user and a keyboard and a pointing device,e.g., a mouse or a trackball, by which the user may provide input to thecomputer. Other kinds of devices may be used to provide for interactionwith a user as well; for example, feedback provided to the user may beany form of sensory feedback, e.g., visual feedback, auditory feedback,or tactile feedback; and input from the user may be received in anyform, including acoustic, speech, or tactile input.

Embodiments of the invention may be implemented in a computing systemthat includes a back end component, e.g., as a data server, or thatincludes a middleware component, e.g., an application server, or thatincludes a front end component, e.g., a client computer having agraphical user interface or a Web browser through which a user mayinteract with an implementation of the invention, or any combination ofone or more such back end, middleware, or front end components. Thecomponents of the system may be interconnected by any form or medium ofdigital data communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), e.g., the Internet.

The computing system may include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

While this specification contains many specifics, these should not beconstrued as limitations on the scope of the invention or of what may beclaimed, but rather as descriptions of features specific to particularembodiments of the invention. Certain features that are described inthis specification in the context of separate embodiments may also beimplemented in combination in a single embodiment. Conversely, variousfeatures that are described in the context of a single embodiment mayalso be implemented in multiple embodiments separately or in anysuitable subcombination. Moreover, although features may be describedabove as acting in certain combinations and even initially claimed assuch, one or more features from a claimed combination may in some casesbe excised from the combination, and the claimed combination may bedirected to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the embodiments described above should not be understoodas requiring such separation in all embodiments, and it should beunderstood that the described program components and systems maygenerally be integrated together in a single software product orpackaged into multiple software products.

In each instance where an HTML file is mentioned, other file types orformats may be substituted. For instance, an HTML file may be replacedby an XML, JSON, plain text, or other types of files. Moreover, where atable or hash table is mentioned, other data structures (such asspreadsheets, relational databases, or structured files) may be used.

Thus, particular implementations of the invention have been described.Other implementations are within the scope of the following claims. Forexample, the actions recited in the claims may be performed in adifferent order and still achieve desirable results.

What is claimed is:
 1. A method for coordinating movements of aplurality of robots configured to operate in a shared workspace,comprising: for each robot in the plurality of robots: identifying a setof tasks assigned to the robot; generating a plurality of candidatemotion plans, each candidate motion plan representing a differentsequence of motions for the robot to execute in performing the set oftasks; for each candidate motion plan: (i) generating a 3D model thatrepresents a volume of space through which the robot would move inexecuting the sequence of motions represented by the candidate motionplan, and (ii) determining a score for the candidate motion plan, thescore based at least on a characteristic of the sequence of motionsrepresented by the candidate motion plan or a characteristic of thevolume of space represented by the 3D model for the motion plan;determining, using the 3D models corresponding to the candidate motionsplans of the plurality of robots, conflicts between candidate motionplans of different robots in the plurality of robots; selecting, foreach robot in the plurality of robots, a motion plan from the pluralityof candidate motion plans for the robot based on the score for theselected motion plan and determined conflicts between candidate motionplans for the robot and candidate motion plans of other robots; andproviding the selected motion plans for execution by the plurality ofrobots.
 2. The method of claim 1 further comprising: for each robot inthe plurality of robots: identifying a plurality of sets of tasksassigned to the robot; generating a plurality of candidate motion plansfor each set of tasks in the plurality of sets of tasks; and selecting,for each robot in the plurality of robots, a motion plan from theplurality of candidate motion plans for each set of the plurality ofsets of tasks.
 3. The method of claim 1 wherein identifying a set oftasks assigned to the robot comprises: generating a plurality ofclusters of tasks by assigning each task in the set of tasks to one ofthe multiple clusters; and for each cluster of the multiple clusters,identifying one or more candidate robots from the plurality of robots toperform the tasks in the cluster.
 4. The method of claim 3 whereingenerating a plurality of clusters of tasks by assigning each task inthe set of tasks to one of the multiple clusters comprises determiningan approximate solution to the traveling salesman problem.
 5. The methodof claim 1 wherein a characteristic of the sequence of motionsrepresented by the candidate motion plan includes an estimated durationof time to execute the candidate motion plan.
 6. The method of claim 1wherein a characteristic of the sequence of motions represented by thecandidate motion plan includes an estimated complexity of a path tracedby the robot during execution of the motion plan.
 7. The method of claim1 wherein a characteristic of the volume of space represented by the 3Dmodel for the motion plan includes the amount of space encompassed bythe 3D model.
 8. The method of claim 1, further comprising: obtaining aworkcell volume cost map, the workcell volume cost map describing costsassociated with a robot occupying different portions of space in theshared workspace; and wherein, for each robot in at least a subset ofthe plurality of robots and for each candidate motion plan in at least asubset of the plurality of candidate motion plans for the robot,determining the score for the candidate motion plan comprises:determining various portions of space that the robot would move throughin executing the sequence of motions represented by the candidate motionplan; determining, using the workcell volume cost map, costs associatedwith the robot moving through the various portions of space; anddetermining the score for the candidate motion plan based on the costsassociated with the robot moving through the various portions of space.9. The method of claim 1 wherein the plurality of candidate motion plansmeet a minimum diversity requirement between a particular motion plan inthe plurality of candidate motion plans and an alternative motion plannot in the plurality of candidate motion plans.
 10. The method of claim9 wherein the minimum diversity requirement measures a differencebetween an amount of space represented by a 3D model for the particularmotion plan and an amount of space represented by a 3D model for thealternative motion plan.
 11. The method of claim 9 wherein the minimumdiversity requirement measures a difference between an estimatedduration of time to complete the particular motion plan and an estimatedduration of time to complete the alternative motion plan.
 12. The methodof claim 9 wherein generating a plurality of candidate motion planscomprises: generating a first plurality of motion plans; and samplingmotion plans from the first plurality of motion plans for inclusion inthe plurality of candidate motion plans based on the minimum diversityrequirements.
 13. One or more non-transitory computer-readable mediahaving instructions stored thereon that, when executed by one or moreprocessors, cause the one or more processors to perform operationscomprising: for each robot in the plurality of robots: identifying a setof tasks assigned to the robot; generating a plurality of candidatemotion plans, each candidate motion plan representing a differentsequence of motions for the robot to execute in performing the set oftasks; for each candidate motion plan: (i) generating a 3D model thatrepresents a volume of space through which the robot would move inexecuting the sequence of motions represented by the candidate motionplan, and (ii) determining a score for the candidate motion plan, thescore based at least on a characteristic of the sequence of motionsrepresented by the candidate motion plan or a characteristic of thevolume of space represented by the 3D model for the motion plan;determining, using the 3D models corresponding to the candidate motionsplans of the plurality of robots, conflicts between candidate motionplans of different robots in the plurality of robots; selecting, foreach robot in the plurality of robots, a motion plan from the pluralityof candidate motion plans for the robot based on the score for theselected motion plan and determined conflicts between candidate motionplans for the robot and candidate motion plans of other robots; andproviding the selected motion plans for execution by the plurality ofrobots.
 14. The computer-readable media of claim 13 wherein theoperations further comprise: for each robot in the plurality of robots:identifying a plurality of sets of tasks assigned to the robot;generating a plurality of candidate motion plans for each set of tasksin the plurality of sets of tasks; selecting, for each robot in theplurality of robots, a motion plan from the plurality of candidatemotion plans for each set of the plurality of sets of tasks.
 15. Thecomputer-readable media of claim 13 wherein identifying a set of tasksassigned to the robot comprises: generating a plurality of clusters oftasks by assigning each task in the set of tasks to one of the multipleclusters; and for each cluster of the multiple clusters, identifying oneor more candidate robots from the plurality of robots to perform thetasks in the cluster.
 16. The computer-readable media of claim 13wherein a characteristic of the sequence of motions represented by thecandidate motion plan includes an estimated duration of time to executethe candidate motion plan or an estimated complexity of a path traced bythe robot during execution of the motion plan.
 17. The computer-readablemedia of claim 13 wherein a characteristic of the volume of spacerepresented by the 3D model for the motion plan includes the amount ofspace encompassed by the 3D model.
 18. The computer-readable media ofclaim 13, wherein the operations further comprise: obtaining a workcellvolume cost map, the workcell volume cost map describing costsassociated with a robot occupying different portions of space in theshared workspace; and wherein, for each robot in at least a subset ofthe plurality of robots and for each candidate motion plan in at least asubset of the plurality of candidate motion plans for the robot,determining the score for the candidate motion plan comprises:determining various portions of space that the robot would move throughin executing the sequence of motions represented by the candidate motionplan; determining, using the workcell volume cost map, costs associatedwith the robot moving through the various portions of space; anddetermining the score for the candidate motion plan based on the costsassociated with the robot moving through the various portions of space.19. The computer-readable media of claim 13 wherein the plurality ofcandidate motion plans meet a minimum diversity requirement between aparticular motion plan in the plurality of candidate motion plans and analternative motion plan not in the plurality of candidate motion plans.20. A system for coordinating movements of a plurality of robotsconfigured to operate in a shared workspace, the system comprising: oneor more computers; and one or more computer-readable media havinginstructions stored thereon that, when executed by the one or morecomputers, cause the one or more computers to perform operationscomprising: for each robot in the plurality of robots: identifying a setof tasks assigned to the robot; generating a plurality of candidatemotion plans, each candidate motion plan representing a differentsequence of motions for the robot to execute in performing the set oftasks; for each candidate motion plan: (i) generating a 3D model thatrepresents a volume of space through which the robot would move inexecuting the sequence of motions represented by the candidate motionplan, and (ii) determining a score for the candidate motion plan, thescore based at least on a characteristic of the sequence of motionsrepresented by the candidate motion plan or a characteristic of thevolume of space represented by the 3D model for the motion plan;determining, using the 3D models corresponding to the candidate motionsplans of the plurality of robots, conflicts between candidate motionplans of different robots in the plurality of robots; selecting, foreach robot in the plurality of robots, a motion plan from the pluralityof candidate motion plans for the robot based on the score for theselected motion plan and determined conflicts between candidate motionplans for the robot and candidate motion plans of other robots; andproviding the selected motion plans for execution by the plurality ofrobots.